package com.yc.bean1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zwei
 * @create 2024-07-28 15:49
 */
public class test3 {
    public static void main(String[] args) {
        ApplicationContext ac=new AnnotationConfigApplicationContext(AppConfig.class);
        //Student student=(Student) ac.getBean("s1");
        Student student=ac.getBean("s1",Student.class);
        System.out.println(student);
    }
}
